package com.itheima.Demo.Demo1;

public class GirlThread extends Thread {
    public static volatile int money = 10;

    @Override
    public void run() {
        try {
            Thread.sleep(500);
            money -= 5;
            System.out.println("还剩余" + money + "元");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
